﻿using System;

namespace Sustainalytics.ESGRatings.BusinessLogic.ESGClient
{
    public  class ESGClientException : Exception
    {

        public ESGClientException()
        {
            
        }
      
        public ESGClientException(string message)
            : base(message)
        {
            
        }
        
        public ESGClientException(string message, Exception innerException)
            : base(message, innerException)
        {
            
        }
        
        protected ESGClientException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            : base(info, context)
        {
            
        }


        public int ErrorStatusCode
        {
            get;
            set;
        }


        public string ErrorMessage
        { 
            get; 
            set;
        }


        public System.Net.HttpStatusCode HttpStatusCode { get; set; }

        public override string ToString()
        {
            return string.Format("[ErrorMessage: {0}, ErrorStatusCode: {1}]", ErrorMessage, ErrorStatusCode);
        }
    }
}
